#makefile for sekios

SUBDIRS = hw boot libc mm proc
.PHONY: subdirs $(SUBDIRS) all clean

all: a.out

a.out: $(SUBDIRS)
	ld -m elf_i386_fbsd  -o a.out -T link.ld boot/*.o hw/*.o libc/*.o mm/*.o proc/*.o
	#strip -x -R .comment a.out
     
subdirs: $(SUBDIRS)
     
$(SUBDIRS):
	$(MAKE) -C $@

libc: boot
hw: libc
mm: libc
proc: hw mm

clean: 
	for dir in $(SUBDIRS); do \
	       $(MAKE) -C $$dir clean; \
	done

tarball: clean
	tar cvzf ../sekios-current.tar.gz --exclude .svn *
